package com.demoo.zjsu.service.smartwebsite;

import com.demoo.zjsu.service.smartwebsite.jwc.JiaowuService;
import com.demoo.zjsu.service.smartwebsite.zjgsu.*;
import com.demoo.zjsu.string.BaseStrings;
import org.apache.log4j.Logger;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * Created by jshjsh on 2016/8/16.
 * 负责定时的页面
 */
@Service
public class PageResolver {

    IFactory factory;

    public void resolver(String beanName) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(BaseStrings.SPRING_FILE);
        factory = (IFactory) context.getBean(beanName);
        factory.resolver();
    }

    public void resolver(Class beanType) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(BaseStrings.SPRING_FILE);
        factory = (IFactory) context.getBean(beanType);
        factory.resolver();
    }

//

}
